package com.znzz.service;

import com.znzz.entity.News;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface NewsService {
    /**
     * 添加新闻
     * @return
     */
    int addNews(News news);

    /**
     * 删除新闻
     */
    boolean deleteNews(Integer newsId);

    /**
     * 修改新闻
     */
    boolean updateNews(News news);

    /**
     * 查询新闻
     */
    List<News> queryNewsByCondition(Map<String,Object> map);

    List<News> findAllNews(Integer pageNum,Integer pageSize);

    int countAllNews();

    News findById(Integer id);
}
